package com.ssy.lingxi.order.model.vo.basic.request;

import com.ssy.lingxi.order.handler.annotation.ContractSourceTypeAnnotation;
import com.ssy.lingxi.order.handler.annotation.DateStringFormatAnnotation;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * Srm订单合同接口参数
 * @author 万宁
 * @version 2.0.0
 * @date 2021-07-18
 */
public class SrmOrderContractVO implements Serializable {
    private static final long serialVersionUID = -6674904953500436522L;

    /**
     * 合同Id
     */
    @NotNull(message = "合同Id要大于0")
    @Positive(message = "合同Id要大于0")
    private Long contractId;

    /**
     * 合同编号
     */
    @NotBlank(message = "合同编号不能为空")
    @Size(max = 30, message = "合同编号最长30个字符")
    private String contractNo;

    /**
     * 合同摘要
     */
    @NotBlank(message = "合同摘要不能为空")
    @Size(max = 50, message = "合同摘要最长50个字符")
    private String digest;

    /**
     * 合同生效日期，格式为yyyy-MM-dd
     */
    @NotBlank(message = "合同生效日期不能为空")
    @DateStringFormatAnnotation
    private String effectDate;

    /**
     * 合同失效日期，格式为yyyy-MM-dd
     */
    @NotBlank(message = "合同失效日期不能为空")
    @DateStringFormatAnnotation
    private String expireDate;

    /**
     * 合同乙方
     */
    @NotBlank(message = "合同乙方不能为空")
    @Size(max = 200, message = "合同乙方最长200个字符")
    private String partB;

    /**
     * 合同寻源类型，0-所有类型，1-采购询价，2-采购招标，3-采购竞价
     */
    @NotNull(message = "合同寻源类型要大于等于0")
    @ContractSourceTypeAnnotation
    private Integer contractType;

    /**
     * 合同剩余金额
     */
    @NotNull(message = "剩余金额要大于等于0")
    @Positive(message = "剩余金额要大于等于0")
    private BigDecimal leftAmount;

    /**
     * 对应单据
     */
    @Size(message = "对应单据最长30个字符")
    private String receiptNo;

    public Long getContractId() {
        return contractId;
    }

    public void setContractId(Long contractId) {
        this.contractId = contractId;
    }

    public String getContractNo() {
        return contractNo;
    }

    public void setContractNo(String contractNo) {
        this.contractNo = contractNo;
    }

    public String getDigest() {
        return digest;
    }

    public void setDigest(String digest) {
        this.digest = digest;
    }

    public String getEffectDate() {
        return effectDate;
    }

    public void setEffectDate(String effectDate) {
        this.effectDate = effectDate;
    }

    public String getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(String expireDate) {
        this.expireDate = expireDate;
    }

    public String getPartB() {
        return partB;
    }

    public void setPartB(String partB) {
        this.partB = partB;
    }

    public Integer getContractType() {
        return contractType;
    }

    public void setContractType(Integer contractType) {
        this.contractType = contractType;
    }

    public BigDecimal getLeftAmount() {
        return leftAmount;
    }

    public void setLeftAmount(BigDecimal leftAmount) {
        this.leftAmount = leftAmount;
    }

    public String getReceiptNo() {
        return receiptNo;
    }

    public void setReceiptNo(String receiptNo) {
        this.receiptNo = receiptNo;
    }
}
